<?php


namespace app\controller\partner;


use app\BaseController;
use app\service\utils\SmsService;

class SmsController extends BaseController
{
    /**
     * 发送短信
     * @return \think\response\Json
     */
    public function sendSms()
    {
        try {
            $mobile = $this->request->param('mobile', '', 'trim');
            $type = $this->request->param('type', '', 'trim');
            SmsService::sendSms($mobile, $type);
            return $this->success();
        } catch (\Exception $exception) {
            return $this->error($exception);
        }
    }
}